package com.siyu.test;
//@author 雷飞
//@email:1834250288@qq.com
//datetime:2022/6/14 19:57

import java.util.Scanner;

public class test3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int applePrice = 8;//苹果8/斤
        int strawberryPrice = 13;//草莓13/斤
        int mangoPrice = 20;//芒果20/斤
        while (true) {
            System.out.println("请输入苹果的斤数");
            int apple = sc.nextInt();
            System.out.println("请输入草莓的斤数");
            int strawberry = sc.nextInt();
            System.out.println("请输入芒果的斤数");
            int mango = sc.nextInt();
            if (apple >= 0 && strawberry >= 0 && mango >= 0) {
                System.out.println("顾客C商品总价" + (apple * applePrice + strawberry * strawberryPrice*0.8 + mango * mangoPrice) + "元");
                return;
            } else {
                System.out.println("输入参数有误，请重新输入");
            }
        }
    }
}
